package com.hyt.it.ogt.kq.service.gov.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hyt.it.ogt.kq.service.gov.model.entity.OfficePlace;
import com.hyt.it.ogt.kq.service.gov.model.entity.OfficeRoom;
import com.hyt.it.ogt.kq.service.gov.model.param.FiltrateRoomParam;
import com.hyt.it.ogt.kq.service.gov.model.param.OfficeRoomParam;
import com.hyt.it.ogt.kq.service.gov.model.vo.FiltrateRoomPageVO;
import com.hyt.model.PageParam;

/**
 * <p>
 * 考场信息表 服务类
 * </p>
 *
 * @author huangyh
 * @since 2021-03-08
 */
public interface IOfficeRoomService extends IService<OfficeRoom> {

    /**
     * 添加考场
     * @param officeRoomParam 添加考场参数
     * @param officeId 机构id
     */
    void add(OfficeRoomParam officeRoomParam, String officeId);

    /**
     * 编辑考场
     * @param officeRoomParam 编辑考场参数
     */
    void update(OfficeRoomParam officeRoomParam);

    /**
     * 筛选编排考点考场分页数据
     * @param pageParam 分页参数对象
     * @param filtrateRoomParam 查询参数对象
     * @param officeId 机构id
     * @return 编排考点考场分页数据
     */
    Page<FiltrateRoomPageVO> filtratePage(PageParam<FiltrateRoomPageVO> pageParam, FiltrateRoomParam filtrateRoomParam, String officeId);

    /**
     * 根据考场编号获取考场
     * @param code 考场编号
     * @return 考场
     */
    OfficeRoom getByCode(String code);

    /**
     * 生成考场编号
     * @param officeRoomParam
     * @param officePlace
     * @param officeId
     * @return
     */
    OfficeRoom generateRoomCode(OfficeRoomParam officeRoomParam, OfficePlace officePlace, String officeId);

    /**
     * 获取机构考场最大序号
     * @param officeId
     * @return
     */
    Integer officeRoomMaxSort(String officeId);

}
